
#pragma once
#include "Vertex.h"


Vertex::Vertex()
{
	_data[Common::X]=0;
	_data[Common::Y]=0;
	_data[Common::Z]=0;
}
Vertex::Vertex(Vector3D new_v):_data(new_v)
{

}
Vertex::Vertex(double x, double y, double z)
{
	_data.set(x,y,z);
}

void Vertex::move(Vector3D direction,double distance)
{
	_data=_data.move(direction,distance);
}

void Vertex::clear()
{
	_faceSet.clear();
	_edgeSet.clear();
}

void Vertex::removeFace(int index)
{
	int nr_faces=_faceSet.size();
	for(int i=0;i<nr_faces;++i) {
		if(index==_faceSet[i]) {
			_faceSet[i]=_faceSet[nr_faces-1];
			_faceSet.pop_back();
			return;
		}
	}
}
